﻿using System.Configuration;

namespace HelpersDotNet.DomainDrivenDesign.Infrastructure.RepositoryFramework.Configuration
{
    public sealed class RepositoryMappingElement : ConfigurationElement
    {
        [ConfigurationProperty(RepositoryMappingConstants.InterfaceShortTypeNameAttributeName,
            IsKey = true, IsRequired = true)]
        public string InterfaceShortTypeName
        {
            get { return this[RepositoryMappingConstants.InterfaceShortTypeNameAttributeName].ToString(); }
            set { this[RepositoryMappingConstants.InterfaceShortTypeNameAttributeName] = value; }
        }

        [ConfigurationProperty(RepositoryMappingConstants.RepositoryFullTypeNameAttributeName,
            IsRequired = true)]
        public string RepositoryFullTypeName
        {
            get { return this[RepositoryMappingConstants.RepositoryFullTypeNameAttributeName].ToString(); }
            set { this[RepositoryMappingConstants.RepositoryFullTypeNameAttributeName] = value; }
        }
    }
}
